#include "tire.h"

Tire::Tire() {
    _driveType = "四轮四驱";
    _maxRange = "10KM";
    _tireModel = "公路轮和麦克纳姆轮";
    _tireSize = 175;
}

void Tire::print() {
    cout << "Tire:" << endl;
    cout << "\ttireModel: " << _tireModel << endl;
    cout << "\tdriveType: " << _driveType << endl;
    cout << "\tmaxRange: " << _maxRange << endl;
    cout << "\ttireSize: " << _tireSize << "mm" << endl;
    
    return;
}

int Tire::save(YAML::Node& node) {
    node["Tire"] = YAML::Node(YAML::NodeType::Map);
    node["Tire"]["driveType"] = _driveType;
    node["Tire"]["maxRange"] = _maxRange;
    node["Tire"]["tireSize"] = _tireSize;
    node["Tire"]["tireModel"] = _tireModel;
    return 0;
}

int Tire::setDriveType(std::string driveType) {
    _driveType = driveType;
    return 0;
}

int Tire::setMaxRange(std::string maxRange) {
    _maxRange = maxRange;
    return 0;
}

int Tire::setTireSize(int tireSize) {
    _tireSize = tireSize;
    return 0;
}

int Tire::setTireModel(std::string tireModel) {
    _tireModel = tireModel;
    return 0;
}
